package com.dcbeida.activity.mine;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import butterknife.Bind;

import com.dcbeida.MyApplication;
import com.dcbeida.R;
import com.dcbeida.activity.BaseActivity;
import com.dcbeida.activity.ProfileActivity;
import com.dcbeida.activity.changepassword.ChangePasswordActivity;
import com.dcbeida.activity.login.LoginActivity;

import java.util.LinkedList;

public class MineActivity extends BaseActivity implements View.OnClickListener{

    @Bind(R.id.img_back)
    ImageView img_back;
    @Bind(R.id.tv_xgmm)
    TextView tv_xgmm;
    @Bind(R.id.tv_tc)
    TextView tv_tc;
    @Bind(R.id.tv_status)
    TextView tv_status;
    @Bind(R.id.tv_account)
    TextView tv_account;
    @Bind(R.id.lin_profile)
    LinearLayout lin_profile;



    @Override
    protected int getLayoutResId() {
        return R.layout.activity_mine;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initListeners();
        initdata();

    }

    private void initListeners() {
        img_back.setOnClickListener(this);
        tv_xgmm.setOnClickListener(this);
        tv_tc.setOnClickListener(this);
        lin_profile.setOnClickListener(this);
    }

    private void initdata(){

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.img_back:
                finish();
                break;
            case R.id.tv_xgmm:
                showActivity(ChangePasswordActivity.class,null);
                break;
            case R.id.tv_tc:
                finish();
                MyApplication.user=null;
                showActivity(LoginActivity.class,null);
                break;
            case R.id.lin_profile:
                showActivity(ProfileActivity.class,null);
                break;
        }
    }
}
